﻿using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Linq;
using System.Text;

namespace UPos.Core
{
    public class ReceiveEntries
    {
        public string FParentID { get; set; }

        public decimal PayMoney { get; set; }

        public PaymentType PaymentType { get; set; }

        public ReceiveEntries() { }

        public ReceiveEntries(DbDataReader reader)
        {
            FParentID = reader.GetString(reader.GetOrdinal("FParentID"));
            PayMoney = reader.GetDecimal(reader.GetOrdinal("PayMoney"));
            PaymentType = new PaymentType(
                reader.GetString(reader.GetOrdinal("TypeID"))
            , reader.GetString(reader.GetOrdinal("TypeName")));
        }
    }
}
